<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class PayMethod extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'pay_methods';
    public $fillable = [
        'name','slug','state','sort','round'
    ];
    public function scopeShow($query){
        return $query->where('state',1);
    }

    public function scopeRound($query){
        return $query->where('round',1);
    }

    public function configs(){
        return $this->hasMany(PayConfig::class);
    }
    
}
